package jax.lang;

/**
 * ...
 * @author tom
 */
class JString implements JCharSequence {
	public var val:String;
	public function new(s:String) {
		this.val = s;
	}
	public function charAt(i:haxe.Int32) {
		return cast val.charCodeAt(haxe.Int32.toInt(i));
	}
	public function subSequence(s:haxe.Int32, e:haxe.Int32) {
		return new JString(val.substr(haxe.Int32.toInt(s), haxe.Int32.toInt(haxe.Int32.sub(e, s))));
	}
	public function toLowerCase() {
		return val.toLowerCase();
	}
	public function toUpperCase() {
		return val.toUpperCase();
	}
	public function length() {
		return val.length;
	}
	public function toString() {
		return val;
	}
	public function toNative() {
		return val;
	}
}